#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
import socket
sk = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

sk.connect(('127.0.0.1', 6667))

while True:
    inp = input("请输入: ")
    sk.sendall(inp.encode())
    if inp is None: continue
    data = sk.recv(1024).decode()
    print(data)

sk.close()
